<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>小苑の博客 - ( •̀ ω •́ )✧</title><meta name="author" content="coderyh"><meta name="copyright" content="coderyh"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="网站描述">
<meta property="og:type" content="website">
<meta property="og:title" content="小苑の博客">
<meta property="og:url" content="http://localhost:4000/blog/page/2/index.html">
<meta property="og:site_name" content="小苑の博客">
<meta property="og:description" content="网站描述">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://localhost:4000/blog/img/avatar.jpg">
<meta property="article:author" content="coderyh">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://localhost:4000/blog/img/avatar.jpg"><link rel="shortcut icon" href="/blog/img/favicon.png"><link rel="canonical" href="http://localhost:4000/blog/page/2/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/blog/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/blog/',
  algolia: undefined,
  localSearch: {"path":"/blog/./search.xml","preload":false,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容：${query}","hits_stats":"共找到 ${hits} 篇文章"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: {"limitDay":365,"position":"top","messagePrev":"It has been","messageNext":"days since the last update, the content of the article may be outdated."},
  highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  infinitegrid: {
    js: 'https://cdn.jsdelivr.net/npm/@egjs/infinitegrid/dist/infinitegrid.min.js',
    buttonText: '加载更多'
  },
  isPhotoFigcaption: true,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '小苑の博客',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2024-06-05 15:47:56'
}</script><script>(win=>{
      win.saveToLocal = {
        set: (key, value, ttl) => {
          if (ttl === 0) return
          const now = Date.now()
          const expiry = now + ttl * 86400000
          const item = {
            value,
            expiry
          }
          localStorage.setItem(key, JSON.stringify(item))
        },
      
        get: key => {
          const itemStr = localStorage.getItem(key)
      
          if (!itemStr) {
            return undefined
          }
          const item = JSON.parse(itemStr)
          const now = Date.now()
      
          if (now > item.expiry) {
            localStorage.removeItem(key)
            return undefined
          }
          return item.value
        }
      }
    
      win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
        const script = document.createElement('script')
        script.src = url
        script.async = true
        script.onerror = reject
        script.onload = script.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          script.onload = script.onreadystatechange = null
          resolve()
        }

        Object.keys(attr).forEach(key => {
          script.setAttribute(key, attr[key])
        })

        document.head.appendChild(script)
      })
    
      win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
        const link = document.createElement('link')
        link.rel = 'stylesheet'
        link.href = url
        if (id) link.id = id
        link.onerror = reject
        link.onload = link.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          link.onload = link.onreadystatechange = null
          resolve()
        }
        document.head.appendChild(link)
      })
    
      win.activateDarkMode = () => {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = () => {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
        if (t === 'dark') activateDarkMode()
        else if (t === 'light') activateLightMode()
      
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
      const detectApple = () => {
        if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
          document.documentElement.classList.add('apple')
        }
      }
      detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.3.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><script>(()=>{
  const $loadingBox = document.getElementById('loading-box')
  const $body = document.body
  const preloader = {
    endLoading: () => {
      $body.style.overflow = ''
      $loadingBox.classList.add('loaded')
    },
    initLoading: () => {
      $body.style.overflow = 'hidden'
      $loadingBox.classList.remove('loaded')
    }
  }

  preloader.initLoading()
  window.addEventListener('load',() => { preloader.endLoading() })

  if (false) {
    document.addEventListener('pjax:send', () => { preloader.initLoading() })
    document.addEventListener('pjax:complete', () => { preloader.endLoading() })
  }
})()</script><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/blog/img/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/blog/archives/"><div class="headline">文章</div><div class="length-num">25</div></a><a href="/blog/tags/"><div class="headline">标签</div><div class="length-num">16</div></a><a href="/blog/categories/"><div class="headline">分类</div><div class="length-num">8</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/blog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 导航</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/blog/navigation/work/"><i class="fa-fw fas fa-coffee"></i><span> 工作</span></a></li><li><a class="site-page child" href="/blog/navigation/moyu/"><i class="fa-fw fas fa-th-list"></i><span> 摸鱼</span></a></li><li><a class="site-page child" href="/blog/navigation/code/"><i class="fa-fw fas fa-code"></i><span> 开发</span></a></li><li><a class="site-page child" href="/blog/navigation/design/"><i class="fa-fw fas fa-pencil-alt"></i><span> 设计</span></a></li><li><a class="site-page child" href="/blog/navigation/resource/"><i class="fa-fw fas fa-book"></i><span> 资源</span></a></li><li><a class="site-page child" href="/blog/navigation/tool/"><i class="fa-fw fas fa-wrench"></i><span> 工具</span></a></li><li><a class="site-page child" href="/blog/navigation/project/"><i class="fa-fw fas fa-project-diagram"></i><span> 项目</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-desktop"></i><span> 软件</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/blog/software/usual/"><i class="fa-fw fas fa-desktop"></i><span> 常用</span></a></li><li><a class="site-page child" href="/blog/software/code/"><i class="fa-fw fas fa-code"></i><span> 开发</span></a></li><li><a class="site-page child" href="/blog/software/open/"><i class="fa-fw fas fa-code-branch"></i><span> 开源</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa fa-compass"></i><span> 目录</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/blog/gallery/"><i class="fa-fw fas fa-images"></i><span> 图库</span></a></div><div class="menus_item"><a class="site-page" href="/blog/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/blog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa fa-user"></i><span> 设置</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/blog/pro/"><i class="fa-fw fas fa-user"></i><span> 页面管理</span></a></li><li><a class="site-page child" href="/blog/admin/"><i class="fa-fw fas fa-user"></i><span> 后台管理</span></a></li><li><a class="site-page child" href="/blog/bridge/"><i class="fa-fw fas fa-cog"></i><span> 配置管理</span></a></li></ul></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background: linear-gradient(20deg, #0062be, #925696, #cc426e, #fb0347)"><nav id="nav"><span id="blog-info"><a href="/blog/" title="小苑の博客"><span class="site-name">小苑の博客</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/blog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 导航</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/blog/navigation/work/"><i class="fa-fw fas fa-coffee"></i><span> 工作</span></a></li><li><a class="site-page child" href="/blog/navigation/moyu/"><i class="fa-fw fas fa-th-list"></i><span> 摸鱼</span></a></li><li><a class="site-page child" href="/blog/navigation/code/"><i class="fa-fw fas fa-code"></i><span> 开发</span></a></li><li><a class="site-page child" href="/blog/navigation/design/"><i class="fa-fw fas fa-pencil-alt"></i><span> 设计</span></a></li><li><a class="site-page child" href="/blog/navigation/resource/"><i class="fa-fw fas fa-book"></i><span> 资源</span></a></li><li><a class="site-page child" href="/blog/navigation/tool/"><i class="fa-fw fas fa-wrench"></i><span> 工具</span></a></li><li><a class="site-page child" href="/blog/navigation/project/"><i class="fa-fw fas fa-project-diagram"></i><span> 项目</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-desktop"></i><span> 软件</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/blog/software/usual/"><i class="fa-fw fas fa-desktop"></i><span> 常用</span></a></li><li><a class="site-page child" href="/blog/software/code/"><i class="fa-fw fas fa-code"></i><span> 开发</span></a></li><li><a class="site-page child" href="/blog/software/open/"><i class="fa-fw fas fa-code-branch"></i><span> 开源</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa fa-compass"></i><span> 目录</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/blog/gallery/"><i class="fa-fw fas fa-images"></i><span> 图库</span></a></div><div class="menus_item"><a class="site-page" href="/blog/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/blog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa fa-user"></i><span> 设置</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/blog/pro/"><i class="fa-fw fas fa-user"></i><span> 页面管理</span></a></li><li><a class="site-page child" href="/blog/admin/"><i class="fa-fw fas fa-user"></i><span> 后台管理</span></a></li><li><a class="site-page child" href="/blog/bridge/"><i class="fa-fw fas fa-cog"></i><span> 配置管理</span></a></li></ul></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">小苑の博客</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="https://github.com/xxxxx" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:xxxxxx@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/blog/20240103230035/" title="Frp自建内网穿透"><img class="post-bg" src="http://localhost:8080/image?1704294035000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="Frp自建内网穿透"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/20240103230035/" title="Frp自建内网穿透">Frp自建内网穿透</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-01-03T15:00:35.000Z" title="发表于 2024-01-03 23:00:35">2024-01-03</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/">开发工具</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/blog/tags/Frp/">Frp</a><span class="article-meta-link">•</span><a class="article-meta__tags" href="/blog/tags/%E5%86%85%E7%BD%91%E7%A9%BF%E9%80%8F/">内网穿透</a></span></div><div class="content">frp自建内网穿透
frp地址：https://github.com/fatedier/frp/releases

frp是一款跨平台的内网穿透工具，支持Windows、macOS与Linux。
1.设置frp服务器
下载相应版本的安装程序，并解压程序

将frp及frps.ini放到具有公网ip的机器上（使用默认配置即可）
12[common]bind_port = 7000

启动服务端程序
1./frps -c ./frps.ini

控制台输出如下内容，代表服务端启动成功：
1232022/11/14 22:09:39 [I] [root.go:206] frps uses config file: ./frps.ini2022/11/14 22:09:39 [I] [service.go:196] frps tcp listen on 0.0.0.0:70002022/11/14 22:09:39 [I] [root.go:215] frps started successfully

注意：请让防火墙通过 7000 端口，以及 7001、7002 端口（即要映射的端口号）
 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/blog/20240103224501/" title="Win10桌面鼠标右键反应慢"><img class="post-bg" src="http://localhost:8080/image" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="Win10桌面鼠标右键反应慢"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/20240103224501/" title="Win10桌面鼠标右键反应慢">Win10桌面鼠标右键反应慢</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-01-03T14:45:01.000Z" title="发表于 2024-01-03 22:45:01">2024-01-03</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/%E9%BB%98%E8%AE%A4%E5%88%86%E7%B1%BB/">默认分类</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/blog/tags/%E9%BB%98%E8%AE%A4%E6%A0%87%E7%AD%BE/">默认标签</a></span></div><div class="content">1、任务栏的搜索框输入regedit（打开注册表管理器）
2、点击第一项【HKEY_CLASSES_ROOT】
3、在菜单栏中选择【编辑】—【查找】
4、在搜索框输入【Directory】,附加选项为【只查看项】，同时勾选【全文匹配】
5、展开至以下位置【HKEY_CLASSES_ROOT\Directory\Backround\shellex\ContextMenuHandlers】
6、删除ContextMenuHandlers中除【New】以外的注册表项
注：若提示无法删除，点击确定就好（因为点击删除后会重置为默认值或变为空值）
*误删【New】：*
结果：右键【新建丢失】
处理：新建【New】→右侧数值为{D969A300-E7FF-11do-A93B-00A0C90F2719}
</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/blog/20240103214453/" title="将一个程序注册为Windows服务"><img class="post-bg" src="http://localhost:8080/image?1704289493000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="将一个程序注册为Windows服务"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/20240103214453/" title="将一个程序注册为Windows服务">将一个程序注册为Windows服务</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-01-03T13:44:53.000Z" title="发表于 2024-01-03 21:44:53">2024-01-03</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/%E9%BB%98%E8%AE%A4%E5%88%86%E7%B1%BB/">默认分类</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/blog/tags/%E9%BB%98%E8%AE%A4%E6%A0%87%E7%AD%BE/">默认标签</a></span></div><div class="content">首先我们先准备一个服务。
1234567891011121314151617package mainimport (	&quot;fmt&quot;	&quot;net/http&quot;)func main() &#123;	fmt.Println(&quot;服务器启动：8080&quot;)	http.HandleFunc(&quot;/index&quot;, indexHandler)	http.ListenAndServe(&quot;:8080&quot;, nil)&#125;func indexHandler(w http.ResponseWriter, r *http.Request) &#123;	w.Write([]byte(&quot;Hello,World!&quot;))&#125;





方式一：使用windows自带的sc命令1sc create demo binpath= &quot;C:\Users\21155\Desktop\demo.exe&quot; type= own start= auto displayname= demo


b ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/blog/20231231045518/" title="Bat系列(一)常用命令"><img class="post-bg" src="http://localhost:8080/image?1703969718000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="Bat系列(一)常用命令"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/20231231045518/" title="Bat系列(一)常用命令">Bat系列(一)常用命令</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-12-30T20:55:18.000Z" title="发表于 2023-12-31 04:55:18">2023-12-31</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/%E9%BB%98%E8%AE%A4%E5%88%86%E7%B1%BB/">默认分类</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/blog/tags/%E9%BB%98%E8%AE%A4%E6%A0%87%E7%AD%BE/">默认标签</a></span></div><div class="content">12345678# 清除屏幕cls# 为命令提示符创建标题title coderyh# 获取本地系统上当前用户的信息whoami



系统变量1234567891011# 查看所有环境变量set# 查看某个环境变量set path# 修改环境变量set username=&quot;test&quot;# 追加环境变量set PATH=&quot;%PATH%;C:&quot;

部分系统变量，可以通过 echo 在命令行窗口查看
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465# 返回当前目录字符串%CD%# 返回 Windows 根目录的位置%SystemRoot%# 返回系统根目录的驱动器%SystemDrive%# 返回默认情况下应用程序存储数据的位置%APPDATA%%LOCALAPPDATA%# 返回操作系统目录的位置%windir%# 指定可执行文件的搜索路径%Path%# 返回 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/blog/20231231044201/" title="Bat系列(二)基础入门"><img class="post-bg" src="http://localhost:8080/image?1703968921000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="Bat系列(二)基础入门"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/20231231044201/" title="Bat系列(二)基础入门">Bat系列(二)基础入门</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-12-30T20:42:01.000Z" title="发表于 2023-12-31 04:42:01">2023-12-31</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/%E5%BC%80%E5%8F%91/">开发</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/blog/tags/Bat/">Bat</a></span></div><div class="content">
pause：暂停批处理的执行，等待用户按下任意键继续

call：调用其它批处理
1call a.bat

exit：退出脚本
1exit /b 0

读取用户输出
1set /p input=&quot;请输入内容：&quot;

显示当前日期和时间
12345@echo offecho 欢迎使用批处理文件echo 当前日期是：%date%echo 当前时间是：%time%pause

特殊符号
&amp;：表示同时执行两个命令，不用管命令是否执行成功
&amp;&amp;：表示前一个命令执行成功后，才执行后一个命令
|：表示将前一个命令的输出结果作为后一个命令的输入
||：表示前一个命令执行失败后，才执行后一个命令
&gt;：表示将命令的输出重定向到文件，覆盖文件中的内容
&gt;&gt;：表示将命令的输出重定向到文件，追加到文件的末尾
2&gt;：表示将命令的错误输出重定向到文件
管道操作符可以将多个命令的输出结果合并到一个文件中

分支语句123456789101112@echo offchcp 65001set /p input=&quot;请输入内容：&quot;if % ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/blog/20231225201144/" title="代码美化-Mac"><img class="post-bg" src="http://localhost:8080/image?1703506304000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="代码美化-Mac"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/20231225201144/" title="代码美化-Mac">代码美化-Mac</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-12-25T12:11:44.000Z" title="发表于 2023-12-25 20:11:44">2023-12-25</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/%E9%BB%98%E8%AE%A4%E5%88%86%E7%B1%BB/">默认分类</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/blog/tags/%E9%BB%98%E8%AE%A4%E6%A0%87%E7%AD%BE-date/">默认标签{date}</a></span></div><div class="content">为Prism加入Mac视窗三个点我们使用JavaScript在pre的前面加入一个class为pre-mac的div
12345678910const container = document?.getElementById(&#x27;container&#x27;)const codeBlocks = container?.getElementsByTagName(&#x27;pre&#x27;)Array.from(codeBlocks).forEach(item =&gt; &#123;  item.style.whiteSpace = &#x27;pre-wrap&#x27;  // Add pre-mac element for Mac Style UI  const preMac = document.createElement(&#x27;div&#x27;)  preMac.classList.add(&#x27;pre-mac&#x27;)  preMac.innerHTML = &#x27;&lt;span&gt;&lt;/span&gt;&lt;span&gt; ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/blog/20231225185353/" title="Docsify+Themeable主题系统"><img class="post-bg" src="http://localhost:8080/image?1703501633000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="Docsify+Themeable主题系统"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/20231225185353/" title="Docsify+Themeable主题系统">Docsify+Themeable主题系统</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-12-25T10:53:53.000Z" title="发表于 2023-12-25 18:53:53">2023-12-25</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/%E9%BB%98%E8%AE%A4%E5%88%86%E7%B1%BB/">默认分类</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/blog/tags/%E9%BB%98%E8%AE%A4%E6%A0%87%E7%AD%BE/">默认标签</a></span></div><div class="content">
主题文档

快速上手创建新的站点index.html
123456789101112131415161718192021222324252627282930313233343536373839&lt;!DOCTYPE html&gt;&lt;html lang=&quot;en&quot;&gt;&lt;head&gt;   &lt;meta charset=&quot;utf-8&quot;&gt;   &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;   &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no, viewport-fit=cover&quot;&gt;   &lt;meta name=&quot;description&quot; content=&quot;&quot; ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/blog/20231225171234/" title="几种实现主题切换的方式"><img class="post-bg" src="http://localhost:8080/image??1703495554000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="几种实现主题切换的方式"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/20231225171234/" title="几种实现主题切换的方式">几种实现主题切换的方式</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-12-25T09:12:34.000Z" title="发表于 2023-12-25 17:12:34">2023-12-25</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/%E9%BB%98%E8%AE%A4%E5%88%86%E7%B1%BB/">默认分类</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/blog/tags/%E9%BB%98%E8%AE%A4%E6%A0%87%E7%AD%BE/">默认标签</a></span></div><div class="content">
CSS color-scheme 和夜间模式 - 掘金 (juejin.cn)

感知系统的主题切换自动更换主题
prefers-color-schema 是 CSS 媒体特性 @media 中用于检测用户是否将系统的主题色设置为亮色或者暗色。

在 CSS 中使用：
123456789101112131415/* Light mode */@media (prefers-color-scheme: light) &#123;  body &#123;    color: black;    background-color: white;  &#125;&#125;/* Dark mode */@media (prefers-color-scheme: dark) &#123;  body &#123;    color: white;    background-color: black;  &#125;&#125;

在 Link 标签中使用：
12345&lt;!-- Light Mode --&gt;&lt;link rel=&quot;stylesheet&quot; m ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/blog/20231211210024/" title="JavaScript系列之循环方式"><img class="post-bg" src="http://localhost:8080/image?1702299624000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="JavaScript系列之循环方式"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/20231211210024/" title="JavaScript系列之循环方式">JavaScript系列之循环方式</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-12-11T13:00:24.000Z" title="发表于 2023-12-11 21:00:24">2023-12-11</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/%E5%BC%80%E5%8F%91/">开发</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/blog/tags/JavaScript/">JavaScript</a></span></div><div class="content">
for 循环
它可以用来重复执行某个代码块，而且可以根据需要控制循环次数。
123for (let i = 0; i &lt; 10; i++) &#123;    console.log(i);&#125;

while 循环
它会重复执行某个代码块，直到指定的条件不在满足为止。
123while (condition) &#123;&#125;

12345let i = 0;while (i &lt; 10) &#123;    console.log(i);    i++;&#125;

do...while 循环
它会先执行一次代码块，然后根据指定的条件重复执行的循环方法。
1234do &#123;&#125;while (condition)

123456let i = 0;do &#123;    console.log(i);    i++;&#125;while (i &lt; 10);

forEach循环
它可以用于数组的遍历。
123array.forEach(element =&gt; &#123;    &#125;);

1234let array  ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/blog/20231209022200/" title="Hexo-插件"><img class="post-bg" src="http://localhost:8080/image?1702059720000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="Hexo-插件"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/20231209022200/" title="Hexo-插件">Hexo-插件</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-12-08T18:22:00.000Z" title="发表于 2023-12-09 02:22:00">2023-12-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/%E9%BB%98%E8%AE%A4%E5%88%86%E7%B1%BB/">默认分类</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/blog/tags/%E9%BB%98%E8%AE%A4%E6%A0%87%E7%AD%BE/">默认标签</a></span></div><div class="content">hexo-admin
在线编辑博客的插件


安装插件  1npm install --save hexo-admin
启动服务器  1hexo server -d
访问  1http://localhost:4000/admin

hexo-bridge由 hexo 提供支持的网站的管理面板。
123npm i --save hexo-bridgehexo serveropen http://localhost:4000/bridge/

hexo-pro一个属于你自己的博客后台
1234# 安装插件npm install --save hexo-prohexo server -dopen http://localhost:4000/pro/

配置登录账号和密码

需要在hexo的_config.yml中增加以下配置来使用账户密码登陆后台，不配置后台会直接登陆。 配置后使用jwt来保护后台访问的接口
12345hexo_pro:  username: admim  password: 123  avatar: https: image for your own avata  sec ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/blog/"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/blog/">1</a><span class="page-number current">2</span><a class="page-number" href="/blog/page/3/#content-inner">3</a><a class="extend next" rel="next" href="/blog/page/3/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/blog/img/avatar.jpg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">coderyh</div><div class="author-info__description">网站描述</div></div><div class="card-info-data site-data is-center"><a href="/blog/archives/"><div class="headline">文章</div><div class="length-num">25</div></a><a href="/blog/tags/"><div class="headline">标签</div><div class="length-num">16</div></a><a href="/blog/categories/"><div class="headline">分类</div><div class="length-num">8</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/xxxxx" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:xxxxxx@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/blog/20240111022327/" title="随机图片接口"><img src="http://localhost:8080/image" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="随机图片接口"/></a><div class="content"><a class="title" href="/blog/20240111022327/" title="随机图片接口">随机图片接口</a><time datetime="2024-01-10T18:23:27.000Z" title="发表于 2024-01-11 02:23:27">2024-01-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/20240105211227/" title="学习笔记"><img src="http://localhost:8080/image?1704460347000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="学习笔记"/></a><div class="content"><a class="title" href="/blog/20240105211227/" title="学习笔记">学习笔记</a><time datetime="2024-01-05T13:12:27.000Z" title="发表于 2024-01-05 21:12:27">2024-01-05</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/20240105205323/" title="觅思文档使用系列(一)"><img src="http://localhost:8080/image?2024-01-05 20:53:23" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="觅思文档使用系列(一)"/></a><div class="content"><a class="title" href="/blog/20240105205323/" title="觅思文档使用系列(一)">觅思文档使用系列(一)</a><time datetime="2024-01-05T12:53:23.000Z" title="发表于 2024-01-05 20:53:23">2024-01-05</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/20240105205205/" title="7z系列(一)"><img src="http://localhost:8080/image?1704459125000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="7z系列(一)"/></a><div class="content"><a class="title" href="/blog/20240105205205/" title="7z系列(一)">7z系列(一)</a><time datetime="2024-01-05T12:52:05.000Z" title="发表于 2024-01-05 20:52:05">2024-01-05</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/20240105204342/" title="Chrome系列(一)"><img src="http://localhost:8080/image?1704458622000" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="Chrome系列(一)"/></a><div class="content"><a class="title" href="/blog/20240105204342/" title="Chrome系列(一)">Chrome系列(一)</a><time datetime="2024-01-05T12:43:42.000Z" title="发表于 2024-01-05 20:43:42">2024-01-05</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/Windows%E7%B3%BB%E5%88%97/"><span class="card-category-list-name">Windows系列</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/%E4%B8%BB%E9%A2%98/"><span class="card-category-list-name">主题</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/"><span class="card-category-list-name">学习笔记</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/%E5%BC%80%E5%8F%91/"><span class="card-category-list-name">开发</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/"><span class="card-category-list-name">开发工具</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/%E7%88%AC%E8%99%AB%E7%B3%BB%E5%88%97/"><span class="card-category-list-name">爬虫系列</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/%E7%AB%99%E7%82%B9%E7%94%9F%E6%88%90%E5%99%A8/"><span class="card-category-list-name">站点生成器</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/%E9%BB%98%E8%AE%A4%E5%88%86%E7%B1%BB/"><span class="card-category-list-name">默认分类</span><span class="card-category-list-count">13</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/blog/tags/Java/" style="font-size: 1.1em; color: #999">Java</a> <a href="/blog/tags/Docsify/" style="font-size: 1.1em; color: #999">Docsify</a> <a href="/blog/tags/Linux/" style="font-size: 1.1em; color: #999">Linux</a> <a href="/blog/tags/%E9%BB%98%E8%AE%A4%E6%A0%87%E7%AD%BE-date/" style="font-size: 1.1em; color: #999">默认标签{date}</a> <a href="/blog/tags/encrypt/" style="font-size: 1.1em; color: #999">encrypt</a> <a href="/blog/tags/Windoes%E7%B3%BB%E5%88%97/" style="font-size: 1.1em; color: #999">Windoes系列</a> <a href="/blog/tags/Bat/" style="font-size: 1.1em; color: #999">Bat</a> <a href="/blog/tags/Butterfly/" style="font-size: 1.3em; color: #99a1ac">Butterfly</a> <a href="/blog/tags/%E9%BB%98%E8%AE%A4%E6%A0%87%E7%AD%BE/" style="font-size: 1.5em; color: #99a9bf">默认标签</a> <a href="/blog/tags/Frp/" style="font-size: 1.1em; color: #999">Frp</a> <a href="/blog/tags/Chrome/" style="font-size: 1.1em; color: #999">Chrome</a> <a href="/blog/tags/%E5%86%85%E7%BD%91%E7%A9%BF%E9%80%8F/" style="font-size: 1.1em; color: #999">内网穿透</a> <a href="/blog/tags/%E7%AB%99%E7%82%B9%E7%94%9F%E6%88%90%E5%99%A8/" style="font-size: 1.1em; color: #999">站点生成器</a> <a href="/blog/tags/hexo/" style="font-size: 1.1em; color: #999">hexo</a> <a href="/blog/tags/JavaScript/" style="font-size: 1.1em; color: #999">JavaScript</a> <a href="/blog/tags/Hexo/" style="font-size: 1.3em; color: #99a1ac">Hexo</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2024/01/"><span class="card-archive-list-date">一月 2024</span><span class="card-archive-list-count">12</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2023/12/"><span class="card-archive-list-date">十二月 2023</span><span class="card-archive-list-count">12</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2023/11/"><span class="card-archive-list-date">十一月 2023</span><span class="card-archive-list-count">1</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">25</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2023-11-30T16:00:00.000Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总字数 :</div><div class="item-count">20.9k</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2024-06-05T07:47:55.719Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2023 - 2024 By coderyh</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text">页脚自定义文本</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/blog/js/utils.js"></script><script src="/blog/js/main.js"></script><script src="/blog/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.autoSpacingPage()
  else {
    getScript('https://cdn.jsdelivr.net/npm/pangu/dist/browser/pangu.min.js')
      .then(() => {
        pangu.autoSpacingPage()
      })
  }
}

function panguInit () {
  if (false){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><div class="js-pjax"><script>window.typedJSFn = {
  init: (str) => {
    window.typed = new Typed('#subtitle', Object.assign({
      strings: str,
      startDelay: 300,
      typeSpeed: 150,
      loop: true,
      backSpeed: 50,
    }, null))
  },
  run: (subtitleType) => {
    if (true) {
      if (typeof Typed === 'function') {
        subtitleType()
      } else {
        getScript('https://cdn.jsdelivr.net/npm/typed.js/dist/typed.umd.min.js').then(subtitleType)
      }
    } else {
      subtitleType()
    }
  }
}
</script><script>function subtitleType () {
  if (true) {
    typedJSFn.init(["( •̀ ω •́ )✧"])
  } else {
    document.getElementById("subtitle").textContent = "( •̀ ω •́ )✧"
  }
}
typedJSFn.run(subtitleType)</script><script>(() => {
  const $mermaid = document.querySelectorAll('#article-container .mermaid-wrap')
  if ($mermaid.length === 0) return
  const runMermaid = () => {
    window.loadMermaid = true
    const theme = document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'default'

    Array.from($mermaid).forEach((item, index) => {
      const mermaidSrc = item.firstElementChild
      const mermaidThemeConfig = '%%{init:{ \'theme\':\'' + theme + '\'}}%%\n'
      const mermaidID = 'mermaid-' + index
      const mermaidDefinition = mermaidThemeConfig + mermaidSrc.textContent

      const renderFn = mermaid.render(mermaidID, mermaidDefinition)

      const renderV10 = () => {
        renderFn.then(({svg}) => {
          mermaidSrc.insertAdjacentHTML('afterend', svg)
        })
      }

      const renderV9 = svg => {
        mermaidSrc.insertAdjacentHTML('afterend', svg)
      }

      typeof renderFn === 'string' ? renderV9(renderFn) : renderV10()
    })
  }

  const loadMermaid = () => {
    window.loadMermaid ? runMermaid() : getScript('https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js').then(runMermaid)
  }

  btf.addGlobalFn('themeChange', runMermaid, 'mermaid')

  window.pjax ? loadMermaid() : document.addEventListener('DOMContentLoaded', loadMermaid)
})()</script></div><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="true"></script><script id="click-heart" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/click-heart.min.js" async="async" mobile="false"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/blog/js/search/local-search.js"></script></div></div></body></html>